<template>
	<view class="content">
		<!-- <topLogo></topLogo> -->
		<view class="navbar">
			<view v-for="(item, index) in firstNavData" :key="index" class="nav-item"
				:class="{current: firstTabCurrentIndex === index}" @click="firstTabClick(index)">
				{{item.title}}
			</view>
		</view>
		<view class="navbar" style="background: #efefef;">
			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{current: tabCurrentIndex === index}"
				@click="tabClick(index)" style="font-size: 26rpx;">
				{{item.text}}
			</view>
		</view>
		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
			<swiper-item class="tab-content" v-for="(tabItem,tabIndex) in navList" :key="tabIndex">
				<scroll-view class="list-scroll-content" scroll-y>
					<!-- 订单列表 -->
					<view v-for="(item,index) in tabItem.orderList" :key="index" class="order-item" @click="openDetail(item)">
						<view class="i-top b-b" v-if="typeId==4">
							<text class="time">订单编号：{{item.code}}</text>
							<text class="state" style="color: #029B00;">{{item.orderStatusName}}</text>
						</view>
						<view class="i-top b-b" v-else-if="typeId==3">
							<text class="time">订单编号：{{item.code}}</text>
							<text class="state" :style="{color: item.stateTipColor}">{{item.stateTip}}</text>
						</view>
						<view class="i-top b-b" v-else>
							<!-- <text class="time" v-if="typeId==4">订单编号：{{item.code}}</text> -->
							<text class="time" v-if="tabCurrentIndex==0">{{item.createTime}}</text>
							<text class="time" v-else>订单编号：{{item.code}}</text>
							<text class="state" :style="{color: item.stateTipColor}">{{item.stateTip}}</text>
						</view>
						<view class="kuaidi" v-if="item.status>=2&&tabItem.state!=11">
							<view class="" v-if="item.productModel!=1">
								<view class="danhao">
									快递单号：{{item.productNum}}
									<view class="btn" style="min-width: 160rpx;" @click="wuLiu(item)">
										物流进度
									</view>
								</view>
								<view class="gongsi">
									快递公司：{{item.productName}}
								</view>
								<view class="gongsi" v-if="item.remark">
									备注：{{item.remark}}
								</view>
							</view>
							<view class="" v-else>
								<view class="danhao">
									自提地点：{{item.addressAddress}}
								</view>
							</view>
						</view>

						<view class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.goodsList" :key="goodsIndex">
							<image class="goods-img"
								:src="'https://weilai.wlsj.site/file/api/uploadFile/downloadByKey?id='+goodsItem.image"
								mode="aspectFill" v-if="typeId==4">
							</image>
							<image class="goods-img" :src="$public.imgageUrl(goodsItem.image)" mode="aspectFill" v-else>
							</image>
							<view class="right">
								<text class="title">名称：{{goodsItem.title}}</text>
								<text class="title">数量：{{goodsItem.num}} </text>
								<!-- <text class="attr-box">商品规格：{{goodsItem.attr_val}} </text>
								<text class="price">{{goodsItem.price}}</text>
								<text class="good-num">x {{goodsItem.num}}</text> -->
							</view>
						</view>

						<!-- <view class="price-box">
							共
							<text class="num">{{item.goodsList.length}}</text>
							件商品 订单金额
							<text class="price">{{item.integral}}</text>
						</view> -->
						<view class="" v-if="tabItem.state==11">
							<view class="action-box b-t">
								<text class="price">￥{{item.money}}</text>
								<view class="" style="display: flex;" v-if="item.stateTip == '审核通过'">
									<button class="action-btn recom shouhou" @click="openKuaiDi(item)">填写快递单号</button>
								</view>
								<view class="" style="font-size: 26rpx;" v-if="item.stateTip == '已完成'">
									商家驳回了您的申请，请联系客服处理
								</view>

							</view>
						</view>
						<view class="" v-if="typeId!=4&&tabItem.state!=11">
							<view class="action-box b-t" v-if="item.status == 0">
								<text class="price">￥{{item.money}}<text v-if="typeId==1">+{{item.integral}}积分</text> </text>
								<view class="action-box-right">
									<button class="action-btn red" @click="cancelOrder(item)">取消订单</button>
									<button class="action-btn recom" @click="payOrder(item)"><text v-if="typeId==1">去兑换</text><text
											v-else>去支付</text> </button>
								</view>
							</view>
							<view class="action-box b-t" v-if="item.status == 1">
								<text class="price">￥{{item.money}}<text v-if="typeId==1">+{{item.integral}}积分</text></text>
								<!-- <button class="action-btn" @click="cancelOrder(item)">取消订单</button> -->
								<view class="" style="display: flex;">
									<button class="action-btn recom shouhou" v-if="typeId==5||typeId==2||typeId==3"
										@click="$public.navto('afterSale',{order: JSON.stringify(item)})">发起售后</button>
									<button class="action-btn recom" v-if="typeId<3">等待发货</button>
									<button class="action-btn recom" v-else-if="typeId==3">查看详情</button>
								</view>
							</view>
							<view class="action-box b-t" v-if="item.status == 2">
								<text class="price">￥{{item.money}}<text v-if="typeId==1">+{{item.integral}}积分</text></text>
								<!-- <button class="action-btn" @click="cancelOrder(item)">取消订单</button> -->
								<view class="" style="display: flex;">
									<button class="action-btn recom shouhou" v-if="item.typeId==5||item.typeId==2"
										@click="$public.navto('afterSale',{order: JSON.stringify(item)})">发起售后</button>
									<button class="action-btn recom" @click="OrderConfirm(item)" v-if="typeId==1">确认收货</button>
								</view>
							</view>
							<view class="action-box b-t" v-if="item.status == 3">
								<text class="price">￥{{item.money}}<text v-if="typeId==1">+{{item.integral}}积分</text></text>
								<!-- <button class="action-btn" @click="cancelOrder(item)">取消订单</button> -->

								<view class="">
									<button class="action-btn recom">已确认收货</button>
								</view>

							</view>
						</view>

					</view>

				</scroll-view>
			</swiper-item>
		</swiper>
		<uni-popup ref="kuaidi">
			<view class="pp-div">
				<view class="pp-div-bg ">
					<view class="title">
						填写快递单号
					</view>
					<view class="title2">
						快递公司
					</view>
					<view class="bqwenzi">
						<uni-easyinput v-model="kdName" placeholder="请填写"></uni-easyinput>
					</view>
					<view class="title2">
						快递单号
					</view>
					<view class="bqwenzi">
						<uni-easyinput v-model="kdNum" placeholder="请填写"></uni-easyinput>
					</view>
					<view class="hongzi">
						我们收到货物将及时处理！
					</view>
					<view class="btn-div">
						<view class="btncss" @click="kuaiDiTiJiao">
							提交
						</view>
					</view>
				</view>
			</view>
		</uni-popup>
		<uni-popup ref="wuLiuJinDu">
			<view class="pp-div">
				<view class="pp-div-bg" style="width: 690rpx; max-height: 50vh;">
					<uni-steps :options="wuLiuData" active-color="#007AFF" :active="wuLiuActive" direction="column" />
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabCurrentIndex: 0,
				allnavList: [{
						state: 0,
						text: '待兑换',
						loadingType: 'more',
						orderList: []
					},
					{
						state: 1,
						text: '待发货',
						loadingType: 'more',
						orderList: []
					},
					{
						state: 2,
						text: '已发货',
						loadingType: 'more',
						orderList: []
					},
					{
						state: 3,
						text: '已完成',
						loadingType: 'more',
						orderList: []
					}
				],
				navList: [],
				typeId: 100,
				// pageNum: 1,
				// pageSize: 10,
				orderByColumn: "createTime",
				isAsc: "desc",
				isJiQi: false,
				kdDataOrder: {},
				kdName: "",
				kdNum: "",
				wuLiuData: [{
					title: '买家下单',
					desc: '2018-11-11'
				}, {
					title: '卖家发货',
					desc: '2018-11-12'
				}, {
					title: '买家签收',
					desc: '2018-11-13'
				}, {
					title: '交易完成',
					desc: '2018-11-14'
				}],
				wuLiuActive: 1,
				firstNavData: [{
						title: '机器订单',
						typeId: 4
					},
					{
						title: '积分订单',
						typeId: 1
					},
					{
						title: '团购订单',
						typeId: 2
					},
					{
						title: '商家订单',
						typeId: 3
					},
					{
						title: '优选订单',
						typeId: 5
					}
				],
				firstTabCurrentIndex: 0,

			};
		},

		onLoad(options) {
			this.getData(options)
		},
		onShow() {
			if (!this.$public.isLoginUrl())
				return false;
		},
		methods: {
			getData(options) {
				let that = this
				// console.log("options", options)
				// this.tabCurrentIndex = +options.state;
				this.tabCurrentIndex = options.state ? options.state : 0;
				// this.typeId=options.typeId
				this.typeId = options.typeId ? options.typeId : 4;
				this.navList = []
				if (this.typeId == 4) {
					this.navList = [{
						state: 1,
						text: '所有订单',
						loadingType: 'more',
						orderList: []
					}]
				} else if (this.typeId == 3) {
					this.navList = [{
							state: 1,
							text: '待使用',
							loadingType: 'more',
							orderList: []
						},
						{
							state: 11,
							text: '退款/售后',
							loadingType: 'more',
							orderList: []
						}
					]
				} else {
					this.allnavList.forEach(item => {
						that.navList.push(item)
					})
				}
				if (this.typeId == 5 || this.typeId == 2) {
					this.navList.splice(2, 2)
					this.navList.push({
						state: 2,
						text: '已完成',
						loadingType: 'more',
						orderList: []
					})
					this.navList.push({
						state: 11,
						text: '退款/售后',
						loadingType: 'more',
						orderList: []
					})
				}
				// console.log("typeId", this.typeId)
				// console.log("this.firstNavData", this.firstNavData)
				this.firstTabCurrentIndex = this.$_.findIndex(this.firstNavData, function(o) {
					return o.typeId == that.typeId;
				})
				// console.log("this.firstTabCurrentIndex", this.firstTabCurrentIndex)
				// this.$public.isLoginUrl()
				this.loadData()
			},
			async getMachineData() {
				// console.log("state", this.$store.state.userInfo.openId)
				let res = await this.$public.htmlPostMachinePay("/open/api/order/getOrderList", {
					OpenId: this.$store.state.userInfo.openId
				})
				console.log("res", res)
				let data = res.data.data
				// 待支付 = -1,支付成功待出货 = 0,已退款 = 1, 退款失败 = 2,出货中 = 3, 出货失败 = 4, 出货成功 = 5,出货超时 = 6, 支付失败 = 7, 支付中 = 8,  退款中 = 9
				let statusArr = ["支付成功待出货", "已退款", "退款失败", "出货中", "出货失败", "出货成功", "出货超时", "支付失败", "支付中", "退款中"]
				data.forEach(item => {
					item.orderStatusName = statusArr[item.orderStatus]
				})
				return data
			},
			//获取订单列表
			async loadData(source) {

				//这里是将订单挂载到tab列表下
				let index = this.tabCurrentIndex;
				let navItem = this.navList[index];
				let state = navItem.state;
				console.log("navItem", navItem)
				// if (source === 'tabChange' && navItem.loaded === true) {
				// 	//tab切换只有第一次需要加载数据
				// 	return;
				// }
				// if (navItem.loadingType === 'noMore') {
				// 	//防止重复加载
				// 	return;
				// }
				// navItem.loadingType = 'loading';
				if (state == 11) {
					const res = await this.$public.htmlPost("/api/getRefund", {
						// pageNum: this.pageNum,
						// pageSize: this.pageSize,
						orderByColumn: this.orderByColumn,
						isAsc: this.isAsc,
						typeId: this.typeId
					}).then((res) => {
						return res
					})
					// console.log("订单列表", res)
					navItem.orderList = []
					res.data.data.forEach(item => {

						item.params.order = Object.assign(item.params.order, this.orderStateExp2(item.status));
						item.params.order.goodsList = JSON.parse(item.params.order.json)
						item.params.order.close = item.close
						item.params.order.refundId = item.refundId
						// if (state == 0)
						// 	item.integral = this.calcTotal(item.goodsList);
						navItem.orderList.push(item.params.order);
					})
				} else if (this.typeId == 4) {
					let res = await this.getMachineData()
					navItem.orderList = []
					res.forEach(item => {
						item.code = item.orderNo
						item.goodsList = [{
							title: item.productName,
							num: 1,
							image: item.productImgUrl
						}]
						navItem.orderList.push(item);
					})
				} else {
					// console.log("this.typeId", this.typeId)
					const res = await this.$public.htmlPost("/api/getOrderList", {
						typeId: this.typeId,
						status: state,
						// pageNum: this.pageNum,
						// pageSize: this.pageSize,
						orderByColumn: this.orderByColumn,
						isAsc: this.isAsc
					}).then((res) => {
						return res
					})
					// console.log("订单列表", res)
					navItem.orderList = []
					res.data.data.forEach(item => {
						item = Object.assign(item, this.orderStateExp(item.status));
						item.goodsList = JSON.parse(item.json)
						// if (state == 0)
						// 	item.integral = this.calcTotal(item.goodsList);
						navItem.orderList.push(item);
					})
				}

				// navItem.loadingType = 'noMore';
				this.$set(navItem, 'loaded', true);
				// if (this.typeId == 4) {
				// 	this.tabCurrentIndex = 1
				// }
				//判断是否还有数据， 有改为 more， 没有改为noMore 

			},
			//计算总价
			calcTotal(goodsList) {
				let total = 0;
				goodsList.forEach(item => {
					total += (item.price * item.num)
				})
				return Number(total.toFixed(2));
			},
			//swiper 切换
			changeTab(e) {
				this.tabCurrentIndex = e.target.current;
				this.loadData('tabChange');
			},
			//顶部tab点击
			tabClick(index) {
				this.tabCurrentIndex = index;
			},
			firstTabClick(index) {
				this.firstTabCurrentIndex = index;
				this.getData({
					typeId: this.firstNavData[index].typeId
				})
			},
			//删除订单
			deleteOrder(index) {
				uni.showLoading({
					title: '请稍后'
				})
				setTimeout(() => {
					this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
					uni.hideLoading();
				}, 600)
			},
			async payOrder(item) {
				this.$public.navto("/pages/order/createOrder", {
					order: JSON.stringify(item)
				})
			},
			async OrderConfirm(item) {
				let that = this
				uni.showModal({
					title: "温馨提示",
					content: "是否确认收货？",
					success: function(res) {
						if (res.confirm) {
							that.ShouHuo(item)
						}
					}
				})

			},
			async ShouHuo(item) {
				uni.showLoading({
					title: '正在处理中'
				})
				const res = await this.$public.htmlPost("/api/OrderConfirm", {
					orderId: item.orderId
				}).then((res) => {
					return res
				})
				// console.log("确认收货", res)
				let list = this.navList[2].orderList;
				let index = list.findIndex(val => val.orderId === item.orderId);
				index !== -1 && list.splice(index, 1);
				this.tabCurrentIndex = 3
				uni.hideLoading();
			},

			//取消订单
			async cancelOrder(item) {
				uni.showLoading({
					title: '请稍后'
				})
				const res = await this.$public.htmlPost("/api/removeOrder", {
					orderId: item.orderId
				}).then((res) => {
					return res
				})
				console.log("取消订单", res)
				let list = this.navList[0].orderList;
				let index = list.findIndex(val => val.orderId === item.orderId);
				index !== -1 && list.splice(index, 1);
				uni.hideLoading();
			},

			//订单状态文字和颜色
			orderStateExp(state) {
				let stateTip = '',
					stateTipColor = '#106cc8';
				switch (+state) {
					case 0:
						stateTip = '待付款';
						break;
					case 1:
						stateTip = '已付款';
						stateTipColor = '#696969';
						break;
					case 2:
						stateTip = '已发货';
						stateTipColor = '#696969';
						break;
					case 3:
						stateTip = '已完成';
						stateTipColor = '#696969';
						break;
						//更多自定义
				}
				return {
					stateTip,
					stateTipColor
				};
			},
			orderStateExp2(state) {
				let stateTip = '',
					stateTipColor = '#DF686A';
				switch (+state) {
					case 0:
						stateTip = '商家审核中';
						break;
					case 1:
						stateTip = '审核通过';
						stateTipColor = '#029B00';
						break;
					case 2:
						stateTip = '已完成';
						stateTipColor = '#696969';
						break;
					case 10:
						stateTip = '退款已原路返回';
						stateTipColor = '#DF686A';
						break;
						//更多自定义
				}
				return {
					stateTip,
					stateTipColor
				};
			},
			openDetail(item) {
				if (this.typeId == 4) return false
				if (item.status == 0 || item.status == 2) return false;
				// console.log("item", item)
				this.$public.navto("/pages/order/detail", {
					orderId: item.orderId
				})
			},
			fuzhi(text) {
				uni.setClipboardData({
					data: text,
					success: function() {
						console.log('success');
					}
				});
			},
			openKuaiDi(item) {
				this.kdDataOrder = item
				this.$refs.kuaidi.open()
			},
			async kuaiDiTiJiao() {
				uni.showLoading({
					title: '请稍后'
				})
				const res = await this.$public.htmlPost("/api/updateRefund", {
					kdName: this.kdName,
					kdNum: this.kdNum,
					refundId: this.kdDataOrder.refundId
				}).then((res) => {
					return res
				})
				console.log("填写单号", res)

				if (res.data.code == 0) {
					this.$api.msg("填写成功")
				} else {
					this.$api.msg(res.data.msg)
				}
				uni.hideLoading();
				this.$refs.kuaidi.close()
			},
			async wuLiu(item) {
				let that = this
				uni.showLoading({
					title: '请稍后'
				})
				const res = await this.$public.htmlPost("/api/getKdList", {
					orderId: item.orderId
				}).then((res) => {
					return res
				})
				// console.log("物流信息", res)
				uni.hideLoading();
				if (res.data.code == 0) {
					let data = res.data.data
					this.wuLiuData = []
					if (data.Traces.length > 0) {
						data.Traces.forEach(item => {
							that.wuLiuData.push({
								title: item.AcceptStation,
								desc: item.AcceptTime
							})
						})
						this.wuLiuActive = data.Traces.length
						console.log("this.wuLiuActive", this.wuLiuActive)

					} else {
						this.wuLiuData.push({
							title: "暂无轨迹信息"
						})
					}
				} else {
					this.$api.msg("暂无物流信息")
				}
				this.$refs.wuLiuJinDu.open("bottom")
			}
		},
	}
</script>

<style lang="scss">
	page,
	.content {
		// background: $page-color-base;
		height: 100%;
	}

	.swiper-box {
		height: calc(100% - 40px);
	}

	.list-scroll-content {
		height: 100%;
	}

	.navbar {
		display: flex;
		height: 40px;
		padding: 0 5px;
		background: #fff;
		box-shadow: 0 1px 1px rgba(0, 0, 0, .06);
		position: relative;
		z-index: 10;

		.nav-item {
			flex: 1;
			display: flex;
			justify-content: center;
			align-items: center;
			height: 100%;
			font-size: 15px;
			color: $font-color-dark;
			position: relative;

			&.current {
				color: #106cc8;

				&:after {
					content: '';
					position: absolute;
					left: 50%;
					bottom: 0;
					transform: translateX(-50%);
					width: 44px;
					height: 0;
					border-bottom: 2px solid #106cc8;
				}
			}
		}
	}

	.tab-content {
		height: auto;
		padding: 0 30rpx;
	}

	.order-item {
		display: flex;
		flex-direction: column;
		// padding-left: 30upx;
		background: #fff;
		margin-top: 30rpx;
		border: $uni-wl-bottom-border;

		.i-top {
			display: flex;
			align-items: center;
			justify-content: space-between;
			height: 86rpx;
			padding: 0 30rpx;
			// padding-right: 30upx;
			font-size: $font-base;
			color: $font-color-dark;
			position: relative;
			border-bottom: $uni-wl-bottom-border;
			font-size: 24rpx;

			.time {
				flex: 1;
			}

			.state {
				color: $base-color;
				font-size: 26rpx;
			}

			.del-btn {
				padding: 10upx 0 10upx 36upx;
				font-size: $font-lg;
				color: $font-color-light;
				position: relative;

				&:after {
					content: '';
					width: 0;
					height: 30upx;
					border-left: 1px solid $border-color-dark;
					position: absolute;
					left: 20upx;
					top: 50%;
					transform: translateY(-50%);
				}
			}
		}

		.kuaidi {
			display: flex;
			flex-direction: column;
			// height: 145rpx;
			justify-content: center;
			padding: 40rpx 30rpx;
			border-bottom: $uni-wl-bottom-border;

			.danhao {
				display: flex;
				align-items: center;

				.btn {
					font-size: 24rpx;
					color: #fff;
					background: #106bc7;
					border-radius: 10rpx;
					margin-left: 20rpx;
					padding: 0 30rpx;
					line-height: 50rpx;
				}
			}

			.gongsi {
				margin-top: 20rpx;
			}
		}

		/* 单条商品 */
		.goods-box-single {
			display: flex;
			padding: 0 30rpx;
			height: 200rpx;
			align-items: center;

			.goods-img {
				width: 106rpx;
				height: 106rpx;
				margin-right: 35rpx;
			}

			.right {
				flex: 1;
				display: flex;
				flex-direction: column;
				// padding: 0 30upx 0 24upx;
				overflow: hidden;
				justify-content: center;

				.title {
					font-size: 30rpx;
					color: #333333;
					line-height: 1;
					line-height: 48rpx;
				}

				.attr-box {
					font-size: $font-sm + 2upx;
					color: $font-color-light;
					padding: 10upx 0;
				}

				.price {
					font-size: $font-base + 2upx;
					color: $font-color-dark;

					&:before {
						content: '￥';
						font-size: $font-sm;
						margin: 0 2upx 0 0;
					}
				}

				.good-num {
					text-align: right;
					font-size: 30upx;
				}
			}
		}

		.price-box {
			display: flex;
			justify-content: flex-end;
			align-items: baseline;
			padding: 20upx 30upx;
			font-size: $font-sm + 2upx;
			color: $font-color-light;

			.num {
				margin: 0 8upx;
				color: $font-color-dark;
			}

			.price {
				font-size: $font-lg;
				color: $font-color-dark;

				&:before {
					content: '￥';
					font-size: $font-sm;
					margin: 0 2upx 0 8upx;
				}
			}
		}

		.action-box {
			display: flex;
			justify-content: space-between;
			align-items: center;
			height: 120rpx;
			// position: relative;
			padding: 0 30rpx;
			border-top: $uni-wl-bottom-border;

			.price {
				font-size: 26rpx;
			}
		}

		.action-box-right {
			display: flex;
		}

		.action-btn {
			display: flex;
			align-items: center;
			justify-content: center;
			// width: 140rpx;
			height: 48rpx;
			font-size: 24rpx;
			color: #0f8eee;
			border: 1px solid #0f8eee;
			background: #fff;
			line-height: 48rpx;

			&.shouhou {
				margin-right: 15rpx;
				color: red;
				border: 1px solid red;
			}

			// border-radius: 100px;
			&.red {
				color: red;
				border: 1px solid red;
				margin-right: 20rpx;
			}
		}
	}


	/* load-more */
	.uni-load-more {
		display: flex;
		flex-direction: row;
		height: 80upx;
		align-items: center;
		justify-content: center
	}

	.uni-load-more__text {
		font-size: 28upx;
		color: #999
	}

	.uni-load-more__img {
		height: 24px;
		width: 24px;
		margin-right: 10px
	}

	.uni-load-more__img>view {
		position: absolute
	}

	.uni-load-more__img>view view {
		width: 6px;
		height: 2px;
		border-top-left-radius: 1px;
		border-bottom-left-radius: 1px;
		background: #999;
		position: absolute;
		opacity: .2;
		transform-origin: 50%;
		animation: load 1.56s ease infinite
	}

	.uni-load-more__img>view view:nth-child(1) {
		transform: rotate(90deg);
		top: 2px;
		left: 9px
	}

	.uni-load-more__img>view view:nth-child(2) {
		transform: rotate(180deg);
		top: 11px;
		right: 0
	}

	.uni-load-more__img>view view:nth-child(3) {
		transform: rotate(270deg);
		bottom: 2px;
		left: 9px
	}

	.uni-load-more__img>view view:nth-child(4) {
		top: 11px;
		left: 0
	}

	.load1,
	.load2,
	.load3 {
		height: 24px;
		width: 24px
	}

	.load2 {
		transform: rotate(30deg)
	}

	.load3 {
		transform: rotate(60deg)
	}

	.load1 view:nth-child(1) {
		animation-delay: 0s
	}

	.load2 view:nth-child(1) {
		animation-delay: .13s
	}

	.load3 view:nth-child(1) {
		animation-delay: .26s
	}

	.load1 view:nth-child(2) {
		animation-delay: .39s
	}

	.load2 view:nth-child(2) {
		animation-delay: .52s
	}

	.load3 view:nth-child(2) {
		animation-delay: .65s
	}

	.load1 view:nth-child(3) {
		animation-delay: .78s
	}

	.load2 view:nth-child(3) {
		animation-delay: .91s
	}

	.load3 view:nth-child(3) {
		animation-delay: 1.04s
	}

	.load1 view:nth-child(4) {
		animation-delay: 1.17s
	}

	.load2 view:nth-child(4) {
		animation-delay: 1.3s
	}

	.load3 view:nth-child(4) {
		animation-delay: 1.43s
	}

	@-webkit-keyframes load {
		0% {
			opacity: 1
		}

		100% {
			opacity: .2
		}
	}

	.ewm {}

	.pp-div {

		padding: $uni-wrap-padding;

		background: linear-gradient(180deg, #FFF2F2 0%, #FFFFFF 100%);
		border-radius: 16rpx;
		padding: 30rpx;

		.pp-div-bg {
			min-width: 500rpx;
			// max-height: 700rpx;
			overflow-y: auto;
			width: 540rpx;
			text-align: center;

			.title {
				font-size: 34rpx;
				color: #333333;
				font-weight: bold;

			}

			.title2 {
				text-align: left;
			}

			.bqwenzi {
				font-size: 34rpx;
				font-weight: bold;
				color: #DF686A;
				line-height: 40rpx;
				margin: 20rpx 0;
			}

			.huizi {

				color: #999999;
				font-size: 28rpx;
				text-align: center;
				margin-bottom: 16rpx;
			}

			.hongzi {

				color: #DF686A;
				font-size: 26rpx;
				text-align: left;
			}

			.dianhua {
				display: flex;
				justify-content: center;
				align-items: center;
				color: #333333;
				font-weight: bold;
				font-size: 34rpx;
				margin-bottom: 64rpx;

				.dianhuaquan {
					width: 48rpx;
					height: 48rpx;
					margin-left: 24rpx;
				}


			}

			.btn-div {
				display: flex;
				justify-content: center;
				margin-top: 20rpx;
			}

			.btncss {
				background: linear-gradient(135deg, #DF686A 0%, #EE8D56 100%);
				box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(223, 104, 106, 0.25);
				border-radius: 40rpx 40rpx 40rpx 40rpx;
				width: 330rpx;
				height: 80rpx;
				letter-spacing: 10rpx;
			}

			.lvzi {
				color: #029B00;
				font-size: 34rpx;
				margin: 40rpx 0;
			}

			.ewm {
				width: 320rpx;
				height: 320rpx;
				background: rgba(223, 104, 106, 0.1);
				border-radius: 16rpx 16rpx 16rpx 16rpx;
				padding: 20rpx;

				.image {
					width: 280rpx;
					height: 280rpx;
				}
			}

			.juzhong {
				display: flex;
				justify-content: center;
				align-items: center;
				margin-top: 42rpx;
				margin-bottom: 16rpx;
			}
		}
	}
</style>